package com.macse1.utils;

public class MyMath {
	public static float clamp(float val, float min, float max) {
		if (val<min) { val = min; }
		else if (val>max) { val = max; }
		return val;
	}
	public static int clamp(int val, int min, int max) {
		if (val<min) { val = min; }
		else if (val>max) { val = max; }
		return val;
	}
}
